package com.woniuxy.classdeans.service.impl;

import com.woniuxy.classdeans.mapper.UserMapper;
import com.woniuxy.classdeans.service.UserService;
import com.woniuxy.commons.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wangyanhui
 * @date 2020/7/30 - 9:43
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 根据角色id 和rid获取用户账户信息
     * @param role 角色名
     * @param rid
     * @return
     */
    @Override
    public User getByRidAndRole(String role, int rid) {

        User user = userMapper.getByRidAndRole(role, rid);

        return user;
    }
}
